package com.mdxx.xczd.ui.contract;

import com.mdxx.xczd.bean.Alarm;
import com.mdxx.xczd.bean.AlarmBeanResult;
import com.mdxx.xczd.bean.AlarmStateResult;
import com.mdxx.xczd.bean.CancelAlarmResult;
import com.mdxx.xczd.bean.FileBean;
import com.mdxx.xczd.bean.FinishedPoint;
import com.mdxx.xczd.bean.SubmitFileResult;
import com.mdxx.xczd.bean.TaskBean;
import com.mdxx.xczd.bean.TaskBeanResult;
import com.mdxx.xczd.bean.VideoBean;
import com.mdxx.xczd.ui.base.BaseModel;
import com.mdxx.xczd.ui.base.BasePresenter;
import com.mdxx.xczd.ui.base.BaseView;

import java.util.List;

import rx.Observable;

/**
 * Created by MD-02 on 2017/1/17.
 */

public interface TaskContract {

    interface Model extends BaseModel{
        Observable<TaskBeanResult> getTaskList();

        Observable<SubmitFileResult> submitFile(FileBean filebean);

        Observable<SubmitFileResult> submitVideo(VideoBean videobean);

        Observable<AlarmBeanResult> sendAlarm(Alarm alarm);

        Observable<TaskBeanResult> submitLocation(String coordinate);

        Observable<TaskBeanResult> submitFinishedPoint(FinishedPoint finishedPoint);

        Observable<CancelAlarmResult> cancelAlarm(String alarmNum);
    }

    interface View extends BaseView{
        void returnTaskList(List<TaskBean> taskList, List<TaskBean> orderList);

        void returnAlarm(String type);

        void returnVideo(VideoBean videobean);

    }

    abstract static class Presenter extends BasePresenter<View, Model> {
        public abstract void getTaskList();

        public abstract void submitFile(String path, String type);

        public abstract void submitVideo(VideoBean videobean);

        public abstract void sendAlarm(String type);

        public abstract void submitLocation(String coordinate);

        public abstract void submitFinishedPoint(FinishedPoint finishedPoint);

        public abstract void cancelAlarm(String cancelAlarm);
    }
}
